window.onscroll = function() {
    let topScroll; //滚动条
    let wrapper = document.getElementsByClassName("wrapper")[0];
    let search = wrapper.getElementsByClassName("search")[0];
    let searchHeight = search.clientHeight;
    window.onscroll = () => {
        topScroll = document.documentElement.scrollTop;
        if (topScroll <= searchHeight) {
            search.style.position = 'static';
        } else {
            //固定定位
            search.style.position = 'fixed';
            search.style.top = 0;
        }
    }
}